

function theme_init() {
    // panel 
    $(".panel.collapsible .panel-header")
		.append("<div class=\"collapse-button inset\"><span></span></div>")
			.find(".collapse-button span")
				.live("click", function (event) {
				    $(this).toggleClass("collapsed")
						.parents(".panel")
							.find(".panel-body")
								.slideToggle("fast");
				});
    $(".panel").addClass("grid_8");
    $(".panel-toolbar").addClass("top clearfix");
    $(".panel form, .dialog form, #login form").addClass("form");

    // table-list
    $("table.table-list tbody tr:not('.nonebg'):even").addClass("even");
    $("table.table-list tbody tr:not('.nonebg'):odd").addClass("odd");

    //tool tip
    if ($.fn.tipsy) {
        var gravity = ['n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw'];
        for (var i in gravity)
            $(".tooltip-" + gravity[i]).tipsy({ gravity: gravity[i] });

        $('input[title], select[title], textarea[title]').tipsy({ trigger: 'focus', gravity: 'w' });
    }

    //place holder
    if ($.fn.placeholder) {
        $('[placeholder]').placeholder();
    }

    $('.form button, .form input:button, .form input:submit').addClass('button');
    $('.button').not('.green,red,blue,black,orange').addClass('gray');
    $('.form input:text, .form input:password, .form select, .form textarea, .form input:password').addClass('input');
    $('.form .input:disabled').addClass('disabled');
    $('.btn-create').addClass('rs-icon-16 icon-add');
    $('.btn-deletes').addClass('rs-icon-16 icon-cross');
    $('.btn-back').addClass('rs-icon-16 icon-arrow-left');
    $('.btn-delete').addClass('rs-icon-16 icon-page-white-delete');
    $('.btn-edit').addClass('rs-icon-16 icon-page-white-edit');
    $('.btn-search').addClass('rs-icon-16 icon-find');
    $('.table-list .btn-create').addClass('icon-page');
}
